﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SqlCe4Mvc3Application1.Models
{
    public partial class _Navigation_MenuPartRecord : RaisingStudio.Data.Expressions.TableExpression, RaisingStudio.Data.Expressions.IQueryExpression<_Navigation_MenuPartRecord>
    {
        #region Constructor (s) / Destructor
        /// <summary>
        /// Constructor (s) / Destructor.
        /// </summary>
        public _Navigation_MenuPartRecord() : base("Navigation_MenuPartRecord")
        {
        }
        #endregion
        #region Members
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Id = "Id";
        public RaisingStudio.Data.Expressions.ColumnExpression Id { get { return _Id; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _MenuText = "MenuText";
        public RaisingStudio.Data.Expressions.ColumnExpression MenuText { get { return _MenuText; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _MenuPosition = "MenuPosition";
        public RaisingStudio.Data.Expressions.ColumnExpression MenuPosition { get { return _MenuPosition; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _OnMainMenu = "OnMainMenu";
        public RaisingStudio.Data.Expressions.ColumnExpression OnMainMenu { get { return _OnMainMenu; } }

		#endregion

        public static implicit operator RaisingStudio.Data.Expressions.ConditionExpression(_Navigation_MenuPartRecord Navigation_MenuPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ConditionExpression();
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression)
        {
             RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
             return conditionExpression.OrderBy(columnExpression);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression, RaisingStudio.Data.Expressions.SortingDirection sortingDirection)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.OrderBy(columnExpression, sortingDirection);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression Where(RaisingStudio.Data.Expressions.ExpressionElement expressionElement)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.Where(expressionElement);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpressionCollection(_Navigation_MenuPartRecord Navigation_MenuPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpressionCollection(Navigation_MenuPartRecord);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpression[](_Navigation_MenuPartRecord Navigation_MenuPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpression[]
                        {                            
                            Navigation_MenuPartRecord.Id,
                            Navigation_MenuPartRecord.MenuText,
                            Navigation_MenuPartRecord.MenuPosition,
                            Navigation_MenuPartRecord.OnMainMenu,
                        };
        }

        public RaisingStudio.Data.Expressions.ColumnExpressionCollection Except(params RaisingStudio.Data.Expressions.ColumnExpression[] columns)
        {
            RaisingStudio.Data.Expressions.ColumnExpressionCollection columnExpressionCollection = this;
            return columnExpressionCollection.Except(columns);
        }

    
        public static implicit operator RaisingStudio.Data.Expressions.QueryExpression<_Navigation_MenuPartRecord>(_Navigation_MenuPartRecord Navigation_MenuPartRecord)
        {
            return new RaisingStudio.Data.Expressions.QueryExpression<_Navigation_MenuPartRecord>(Navigation_MenuPartRecord);
        }


        #region IQueryExpression<_Navigation_MenuPartRecord> 成员

        _Navigation_MenuPartRecord RaisingStudio.Data.Expressions.IQueryExpression<_Navigation_MenuPartRecord>.Value
        {
            get { return Navigation_MenuPartRecord._; }
        }

        #endregion

        #region IQueryExpression 成员

        RaisingStudio.Data.Expressions.TableExpression RaisingStudio.Data.Expressions.IQueryExpression.Table
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ConditionExpression RaisingStudio.Data.Expressions.IQueryExpression.Condition
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ColumnExpressionCollection RaisingStudio.Data.Expressions.IQueryExpression.Columns
        {
            get { return null; }
        }

        #endregion
    }

    partial class Navigation_MenuPartRecord
    {
        #region Members
        public static readonly _Navigation_MenuPartRecord _ = new _Navigation_MenuPartRecord();
		#endregion
    }
}
